// 双指针
#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
void solve(int cs) {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> h(n);
  vector<int> b(m);
  int ph = 0, pb = 0;
  for (int i = 0; i < n; i++) {
    cin >> h[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
  }
  sort(h.begin(), h.end(), cmp);
  sort(b.begin(), b.end(), cmp);
  int cnt = 0;
  while (ph < n && pb < m) {
    if (h[ph] <= b[pb]) {
      cnt++;
      pb++;
    }
    ph++;
  }
  cout << (cnt >= k ? "Yes" : "No") << endl;
}

int main() { return 0; }